package com.bdqn;

import com.bdqn.buyer.Buyer;
import com.bdqn.buyer.IntermediaryCglibProxyFactory;
import com.bdqn.buyer.RealBuyer;

/**
 * Test05 测试动态代理模式（CGLIB方式）
 *
 * @author LILIBO
 * @since 2021-10-08
 */
public class Test05 {

    public static void main(String[] args) {

        // 动态代理，方式二：使用CGLIB动态代理实现
        Buyer buyer = IntermediaryCglibProxyFactory.create(RealBuyer.class);
        String msg = buyer.havealook();
        System.out.println(msg);
    }
}
